package com.example.demo.strategy;

import org.springframework.web.multipart.MultipartFile;

import java.io.FileInputStream;

public interface UploadStrategy {

    /**
     * Upload string.
     * 以文件的方式上传文件
     *
     * @param path the path
     * @param file the file
     * @return the string
     */
    String upload(String path, MultipartFile file);

    /**
     * Upload string.
     * 以流的方式上传文件
     *
     * @param name        the name
     * @param path        the path
     * @param inputStream the input stream
     * @return the string
     */
    String upload(String name, String path, FileInputStream inputStream);

}
